package psn.zjk.spring.trace.entity;

import com.fasterxml.jackson.annotation.JsonValue;
import psn.zjk.spring.utils.JacksonUtils;

/**
 * @author zhangjk
 * @Description
 * @CREATE_TIME 2021/6/22 11:27
 */
public class TraceInfo {
    private String  traceId;
    private String  clazz;
    private String  method;
    private String  args;
    private String  start;
    private String end;
    private int cost;
    private String  from;
    private String  target;

    public void setTraceId(String traceId) {
        this.traceId = traceId;
    }

    public void setClazz(String clazz) {
        this.clazz = clazz;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public void setArgs(String args) {
        this.args = args;
    }

    public void setStart(String start) {
        this.start = start;
    }

    public void setEnd(String end) {
        this.end = end;
    }

    public void setCost(int cost) {
        this.cost = cost;
    }

    public void setFrom(String from) {
        this.from = from;
    }

    public void setTarget(String target) {
        this.target = target;
    }

    @Override
    @JsonValue//序列化
    public String toString() {
        return JacksonUtils.object2Json(this);
    }
}